package day06;

public class MethodDemo {
    public static void main(String[] args) {


           // say();
            //System.out.println("你好");
        //sayHi("许威");
        sayHello("许威",60);
        //double x= getNum();
       // System.out.println(x);


        /*int q=80,w=90;
        int d= plus(q,w);
        System.out.println(d);*/
        /*int[] t=sutAuy(8);
        System.out.println("数组的长度："+t.length);
        for (int i=0;i<t.length;i++){
            System.out.println(t[i]);

        }*/

    }
    public static void sayHi(String name){
        System.out.println("我的名字叫"+name+",今年22岁了");
    }
    public static void sayHello(String name,int age){
        if (age>66){//在某种特定条件下，提前结束方法
            return;//结束方法执行
        }
        System.out.println("我的名字叫"+name+",今年"+age+"岁了");
    }
    public static void say(){
        System.out.println("刘思甜");

    }

    public static double getNum(){
        return 9.9*6.6;
    }




    public static int plus(int num1,int num2){
        int num3=num1*num2;
        return num3=num2*num1;
    }





    public static int[] sutAuy(int leg){
        int[]  a =new int[leg];
        for (int i=0;i<a.length;i++) {
            a[i] = (int) (Math.random() * 100);
        }
         return a;

    }
}
